// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** /getBugDetail 获取缺陷详情 GET /api/bug */
export async function getBugDetailUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getBugDetailUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBugVo_>('/api/bug', {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** addBug 添加缺陷 POST /api/bug/add */
export async function addBugUsingPost(body: API.AddBugRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean_>('/api/bug/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** deleteBug 删除缺陷 DELETE /api/bug/delete */
export async function deleteBugUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteBugUsingDELETEParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/bug/delete', {
    method: 'DELETE',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** pageBugDynamics 分页获取缺陷动态 POST /api/bug/dynamics/page */
export async function pageBugDynamicsUsingPost(
  body: API.PageBugDynamicRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageBugDynamicVo_>('/api/bug/dynamics/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** listUndoBugList 查询我的未完成缺陷列表 POST /api/bug/listUndoBugList */
export async function listUndoBugListUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseListBugVo_>('/api/bug/listUndoBugList', {
    method: 'POST',
    ...(options || {})
  })
}

/** pageBugs 分页查询缺陷 POST /api/bug/page */
export async function pageBugsUsingPost(
  body: API.PageBugRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageBugVo_>('/api/bug/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** updateBug 更新缺陷 PUT /api/bug/update */
export async function updateBugUsingPut(
  body: API.UpdateBugRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/bug/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}
